package com.charging.service;

import com.charging.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserService {
    User register(User user);
    User login(String username, String password);
    User getUserById(Long id);
    User getUserByUsername(String username);
    boolean updateUser(User user);
    boolean addUser(User user);
    boolean deleteUser(Long id);
    boolean updateBalance(Long userId, Double amount);

    boolean checkUsernameExist(String username);

    List<User> selectAll();

    /**
     * 更新用户位置
     */
    void updateUserLocation(Long userId, Double lat, Double lng);


    long getTotalUserCount();

    User getUserByUserNameAndPassword(String name, String password);
}